home *** CD-ROM | disk | FTP | other *** search
/ Stone Design / Stone Design.iso / Stone_Friends / Wave / WavesWorld / Source / Shaders / WWShaders / WWTranslucentPlastic.sl < prev   
Encoding:
Text File  |  1995-03-23  |  477 b   |  16 lines

  1. surface 
  2. WWTranslucentPlastic(float  Ks              =  0.5, 
  3.                             Kd            =  0.5, 
  4.                     Ka            =  1.0, 
  5.                     roughness     =  0.1; 
  6.                  color  specularcolor =  1.0,
  7.                             opacity       =  0.5)
  8. {
  9.     point Nf = faceforward(normalize(N), I );
  10.     point V = normalize(-I);
  11.     
  12.     Oi = Os * opacity;
  13.     Ci = Oi * ( Cs * (Ka*ambient() + Kd*diffuse(Nf)) + 
  14.          specularcolor * Ks * specular(Nf,V,roughness) );
  15. }
  16.